Hosting a Dedicated Server
A Dedicated Server is a method of hosting an Unturned server that does not require the host to be an active player in the game. The host can choose to play on the server, or just leave it running in the background while others play on it. Unlike a Local Server, port forwarding is required. A Dedicated Server also allows for vastly increased versatility in configuration of the server. Many server options become available through the Commands.dat, Config.json, server console, and other configuration files. Networking: In order for others to join the server, several ports must be forwarded on your router. Port Range Forwarding: In order for anyone to access the server you've set up, you need to go into your router's settings and open the server's set ports. Follow the steps below: #Open any internet browser, and type your default gateway into the address bar, then hit enter. #Find a section for Port Forwarding. #Click the option that allows you to add a new port, or rule. #The default port range is 27015 to 27017, with 27015 being the connecting port. #You must enter an IP Address, or Destination Address, using either a Dynamic IP or Static IP. #The preferred protocol is UDP. Single Port Forwarding: Setup: Windows: #Right-click the "Unturned.exe", hover the mouse over "Send To", and click on "Desktop (create shortcut)". #Right-click on the shortcut and select "Properties". The "Target:" field should contain the path to Unturned.exe and should look something like this: #: "C:\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned.exe" #Now, at the end of the string of text, insert this string of text: #: -nographics -batchmode +secureserver/... :... is whatever you want to name your server. An example of a finished "Target" field: "C:\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned.exe" -nographics -batchmode +secureserver/My server :4. Finally, run the server. A black console screen should appear, with no text. :5. Optional: You can easily update an existing Unturned server by using the following method: The following text string will create a shortcut that will automatically update your server. This example assumes that you installed your server through SteamCMD, which does not update Unturned automatically. "C:\SteamCMD\steamcmd.exe +login Username Password +app_update 304930 +exit" Mac OS X: # From the Steam window, right-click the Unturned game in your Library and select "Properties". # Click in the "Local Files" tab. # Click "Browse Local Files...". # Optional: Go back to Common, duplicate the Unturned folder, paste it in Common and name it Unturned Server) # In the Finder window right click on Unturned # Select Show Package Contents # Select Contents # Select MacOS # Open up terminal # Then drag the Unturned executable into the terminal window (this will translate it into a line of text) # Press space # Then add in your parameters (this is the same as step 3 of Windows 3.0.0 setup, except that the program will be referred to as Unturned.app instead of Unturned.exe) # Then press enter With Unturned 3.0, the procedure is exactly the same, but after the parameters, you need to add: +secureserver/servername Replace "secureserver" with "lanserver" if you want a LAN server instead. Replace "servername" with what you want to name your server. Linux Configuration: Commands.dat: The Commands.dat file is used to set the general server settings that will run whenever the server starts. It can be opened with any text editor. A separate line should be used for each unique command inputted. Config.json: Connecting: You should now be able to connect to your own server by running the game through Steam. To do this, click "Play", and then "Connect", and in the IP field, type "localhost", then click "Connect" to join your own server. If you fail to connect to your own server, try installing SteamVR (found under tools in Steam). Note: Other players will not use "localhost", only you will. Other players will use your EXTERNAL IP to connect to your server. Find your external IP by visiting http://www.whatismyip.com/